# 定义子应用的所有路由from django.conf.urls import urlfrom . import viewsurlpatterns = [    # 测试视图和路由的匹配    # url(正则路由, 视图)    #  # http://127.0.0.1:8000/users/index/    # url(r'^index/$', views.index),    # 子应用的路由全部定义在子路由中    url(r'^users/index/$', views.index, name='index'),    # 测试路由的匹配顺序: 路由匹配顺序时自上而下的    # http://127.0.0.1:8000/users/say    # http://127.0.0.1:8000/users/sayhello    # url(r'^users/say', views.say),    # url(r'^users/sayhello', views.say_hello),    # 定义路由时,必须要有严格的开始和结束 ^ $    url(r'^users/say$', views.say),    url(r'^users/sayhello$', views.say_hello),]